package com.stylefeng.guns.modular.system.model;

import java.io.Serializable;
import java.util.List;

/**
 * 用户实体
 * Created by hasee on 2017/8/11.
 */
public class ClmUserEntity implements Serializable {

    /*"userId": 334,
        "name": "张凯强",
        "provinceCode": "140000",
        "provinceName": "山西省",
        "cityCode": "140100",
        "cityName": "太原市",
        "areaCode": "140105",
        "areaName": "小店区",
        "schoolId": "135",
        "schoolName": "第二十四中学",
        "classId": null,
        "className": null,
        "gradeId": "9",
        "gradeName": "九年级",
        "userTypeId": 2,
        "userTypeName": "家长",
        "addressHouseNumber": "设计师小区23号楼1202",
        "birthday": "1975-05-02",
        "email": "356111@163.com",
        "workState": "1",
        "workTime": "2017-07-07",
        "phoneNumber": "18803510000",
        "officeTel": null,
        "workLocation": "北河湾路21号",
        "enable": "0",
        "departmentId": "135",
        "parentId": "124",
        "postId": "1"*/
    //用户id
	//年级id
    
    private String gradeLever;
	
    private String userId;
    
    private String accountID;
    
    //用户姓名
    
    private String name;
    //用户所属省份id
    
    private String provinceCode;
    //用户所属省份名称
    
    private String provinceName;
    //用户所属城市id
    
    private String cityCode;
    //用户所属城市名称
    
    private String cityName;
    //用户所属地区id
    
    private String areaCode;
    //用户所属地区名称
    
    private String areaName;
    //用户所属学校id
    
    private String schoolId;
    //用户所属学校名称
    
    private String schoolName;
    //用户所属班级id
    
    private String classId;
    //用户所属班级名称
    
    private String className;
    //用户所属年级id (学生 gradeId 1-12 代表1-12年级)
    
    private String gradeId;
    //用户所属年级名称
    
    private String gradeName;
    //用户角色id
    
    private String userTypeId;
    //用户角色名称
    
    private String userTypeName;
    //用户住址及门牌号
    
    private String addressHouseNumber;
    //用户生日
    
    private String birthday;
    //用户点子邮箱地址
    
    private String email;
    //用户手机号
    
    private String phoneNumber;
    //用户办公室座机号
    
    private String officeTel;
    /** 工作状态*/
    
    private Integer workState;
    /** 身份证号*/
    
    private String documentNumber;
    /** 头像*/
    
    private String photo;
    /** 性别*/
    
    private Integer sex;
    /** 职称*/
    
    private String professional;
    //科目信息
    
    private List<ClmSubjectEntity> courseData;
    
  //年级信息list(老师取gradeData 里的gradeId 1-12  代表1-12年级)
    
    private List<ClmGradeEntity> gradeData;
    
  //班级信息list
    
    private List<ClmClassEntity> classData;
    
  //部门id
    
    private String departmentId;
    
    
    private String departmentName;
    
    
   // private List<ClmDeparementEntity> deparement;
    
    //站点id
    
    private String tenantId;

    
    private String orgProvinceCode;
	
    private String orgProvinceName;
    
    private String orgCityCode;
    
    private String orgCityName;
    
    private String orgAreaCode;
    
    private String orgAreaName;
    
    public String getTenantId() {
		return tenantId;
	}

	public void setTenantId(String tenantId) {
		this.tenantId = tenantId;
	}

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    
    public String getAccountID() {
		return accountID;
	}

	public void setAccountID(String accountID) {
		this.accountID = accountID;
	}

	public String getDepartmentId() {
		return departmentId;
	}

	public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getProvinceCode() {
        return provinceCode;
    }

    public void setProvinceCode(String provinceCode) {
        this.provinceCode = provinceCode;
    }

    public String getProvinceName() {
        return provinceName;
    }

    public void setProvinceName(String provinceName) {
        this.provinceName = provinceName;
    }

    public String getCityCode() {
        return cityCode;
    }

    public void setCityCode(String cityCode) {
        this.cityCode = cityCode;
    }

    public String getCityName() {
        return cityName;
    }

    public void setCityName(String cityName) {
        this.cityName = cityName;
    }

    public String getAreaCode() {
        return areaCode;
    }

    public void setAreaCode(String areaCode) {
        this.areaCode = areaCode;
    }

    public String getAreaName() {
        return areaName;
    }

    public void setAreaName(String areaName) {
        this.areaName = areaName;
    }

    public String getSchoolId() {
        return schoolId;
    }

    public void setSchoolId(String schoolId) {
        this.schoolId = schoolId;
    }

    public String getSchoolName() {
        return schoolName;
    }

    public void setSchoolName(String schoolName) {
        this.schoolName = schoolName;
    }

    public String getClassId() {
    	//判断是否是老师
    	//是老师,便利classData,classId以逗号隔开。
    	
    	if("1".equals(userTypeId)){
    		classId="";
    		for(ClmClassEntity cd : classData){
    			classId+=","+cd.getClassId();
    		}
    		classId.replaceFirst(",", "");
    	}
    	
        return classId;
    }

    public void setClassId(String classId) {
        this.classId = classId;
    }

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    public String getGradeId() {
    	//判断是否是老师
    	//是老师,便利gradeData,gradeId以逗号隔开。
    	
    	if("1".equals(userTypeId)){
    		gradeId="";
    		for(ClmGradeEntity cg : gradeData){
    			gradeId+=","+cg.getGradeId();
    		}
    		gradeId.replaceFirst(",", "");
    	}
    	
        return gradeId;
    }

    public void setGradeId(String gradeId) {
        this.gradeId = gradeId;
    }

    public String getGradeName() {
        return gradeName;
    }

    public void setGradeName(String gradeName) {
        this.gradeName = gradeName;
    }

    public String getUserTypeId() {
        return userTypeId;
    }

    public void setUserTypeId(String userTypeId) {
        this.userTypeId = userTypeId;
    }

    public String getUserTypeName() {
        return userTypeName;
    }

    public void setUserTypeName(String userTypeName) {
        this.userTypeName = userTypeName;
    }

    public String getAddressHouseNumber() {
        return addressHouseNumber;
    }

    public void setAddressHouseNumber(String addressHouseNumber) {
        this.addressHouseNumber = addressHouseNumber;
    }

    public String getBirthday() {
        return birthday;
    }

    public void setBirthday(String birthday) {
        this.birthday = birthday;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getPhoneNumber() {
        return phoneNumber;
    }

    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
    }

    public String getOfficeTel() {
        return officeTel;
    }

    public void setOfficeTel(String officeTel) {
        this.officeTel = officeTel;
    }


    public String getPhoto() {
		return photo;
	}

	public void setPhoto(String photo) {
		this.photo = photo;
	}

	public List<ClmSubjectEntity> getCourseData() {
		return courseData;
	}

	public void setCourseData(List<ClmSubjectEntity> courseData) {
		this.courseData = courseData;
	}

	public Integer getWorkState() {
		return workState;
	}

	public void setWorkState(Integer workState) {
		this.workState = workState;
	}

	public String getDocumentNumber() {
		return documentNumber;
	}

	public void setDocumentNumber(String documentNumber) {
		this.documentNumber = documentNumber;
	}

	public Integer getSex() {
		return sex;
	}

	public void setSex(Integer sex) {
		this.sex = sex;
	}
	
	

    
	public List<ClmGradeEntity> getGradeData() {
		return gradeData;
	}

	public void setGradeData(List<ClmGradeEntity> gradeData) {
		this.gradeData = gradeData;
	}

	public List<ClmClassEntity> getClassData() {
		return classData;
	}

	public void setClassData(List<ClmClassEntity> classData) {
		this.classData = classData;
	}

/*	public String getDepartmentId() {
        departmentId="";
        if(deparement !=null){
            for(ClmDeparementEntity cdep : deparement){
                if(cdep!=null){
                    departmentId+=","+cdep.getDepId();
                }
            }
            departmentId=departmentId.replaceFirst(",", "");
        }
        return departmentId;
	}*/

	public void setDepartmentId(String departmentId) {
		this.departmentId = departmentId;
	}

	public String getDepartmentName() {
        departmentName="教研室";

        System.out.print("departmentName////////////////////////"+departmentName+"???????");

        /*if(deparement !=null ){
            for(ClmDeparementEntity cdep : deparement){
                if(cdep!=null){
                    departmentName+=","+cdep.getName();
                }
            }
            departmentName=departmentName.replaceFirst(",", "");
        }*/

        return departmentName;
    }

	public void setDepartmentName(String departmentName) {
		this.departmentName = departmentName;
	}
	

	/*public List<ClmDeparementEntity> getDeparement() {
		return deparement;
	}

	public void setDeparement(List<ClmDeparementEntity> deparement) {
		this.deparement = deparement;
	}*/

	public String getProfessional() {
		return professional;
	}

	public void setProfessional(String professional) {
		this.professional = professional;
	}
	public String getGradeLever() {
		return gradeLever;
	}

	public void setGradeLever(String gradeLever) {
		this.gradeLever = gradeLever;
	}
	
	public String getOrgProvinceCode() {
		return orgProvinceCode;
	}

	public void setOrgProvinceCode(String orgProvinceCode) {
		this.orgProvinceCode = orgProvinceCode;
	}

	public String getOrgProvinceName() {
		return orgProvinceName;
	}

	public void setOrgProvinceName(String orgProvinceName) {
		this.orgProvinceName = orgProvinceName;
	}

	public String getOrgCityCode() {
		return orgCityCode;
	}

	public void setOrgCityCode(String orgCityCode) {
		this.orgCityCode = orgCityCode;
	}

	public String getOrgCityName() {
		return orgCityName;
	}

	public void setOrgCityName(String orgCityName) {
		this.orgCityName = orgCityName;
	}

	public String getOrgAreaCode() {
		return orgAreaCode;
	}

	public void setOrgAreaCode(String orgAreaCode) {
		this.orgAreaCode = orgAreaCode;
	}

	public String getOrgAreaName() {
		return orgAreaName;
	}

	public void setOrgAreaName(String orgAreaName) {
		this.orgAreaName = orgAreaName;
	}

	@Override
	public String toString() {
		return "ClmUserEntity [gradeLever=" + gradeLever + ", userId=" + userId
				+ ", accountId=" + accountID + ", name=" + name
				+ ", provinceCode=" + provinceCode + ", provinceName="
				+ provinceName + ", cityCode=" + cityCode + ", cityName="
				+ cityName + ", areaCode=" + areaCode + ", areaName="
				+ areaName + ", schoolId=" + schoolId + ", schoolName="
				+ schoolName + ", classId=" + classId + ", className="
				+ className + ", gradeId=" + gradeId + ", gradeName="
				+ gradeName + ", userTypeId=" + userTypeId + ", userTypeName="
				+ userTypeName + ", addressHouseNumber=" + addressHouseNumber
				+ ", birthday=" + birthday + ", email=" + email
				+ ", phoneNumber=" + phoneNumber + ", officeTel=" + officeTel
				+ ", workState=" + workState + ", documentNumber="
				+ documentNumber + ", photo=" + photo + ", sex=" + sex
				+ ", professional=" + professional + ", courseData="
				+ courseData + ", gradeData=" + gradeData + ", classData="
				+ classData + ", departmentId=" + departmentId
				+ ", departmentName=" + departmentName + ", tenantId="
				+ tenantId + ", orgProvinceCode=" + orgProvinceCode
				+ ", orgProvinceName=" + orgProvinceName + ", orgCityCode="
				+ orgCityCode + ", orgCityName=" + orgCityName
				+ ", orgAreaCode=" + orgAreaCode + ", orgAreaName="
				+ orgAreaName + "]";
	}

	
	
}
